<?php

/**
 * Profesores filter form base class.
 *
 * @package    Fix_Student
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseProfesoresFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'cedula'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'nombres'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'apellidos'    => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'sexo'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'direccion'    => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'telefono'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'email'        => new sfWidgetFormFilterInput(array('with_empty' => false)),
    ));

    $this->setValidators(array(
      'cedula'       => new sfValidatorPass(array('required' => false)),
      'nombres'      => new sfValidatorPass(array('required' => false)),
      'apellidos'    => new sfValidatorPass(array('required' => false)),
      'sexo'         => new sfValidatorPass(array('required' => false)),
      'direccion'    => new sfValidatorPass(array('required' => false)),
      'telefono'     => new sfValidatorPass(array('required' => false)),
      'email'        => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('profesores_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Profesores';
  }

  public function getFields()
  {
    return array(
      'idprofesores' => 'Number',
      'cedula'       => 'Text',
      'nombres'      => 'Text',
      'apellidos'    => 'Text',
      'sexo'         => 'Text',
      'direccion'    => 'Text',
      'telefono'     => 'Text',
      'email'        => 'Text',
    );
  }
}
